package com.management.service.Impl;

import com.management.dao.OrderFormDao;
import com.management.po.OrderForm;
import com.management.service.OrderFormService;
import com.management.vo.OrderFormVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author hrf
 * 订单表的业务逻辑实现类
 */
@Service
public class OrderFormServiceImpl implements OrderFormService {
    @Autowired
    OrderFormDao orderFormDao;

    @Override
    public List<OrderFormVO> findAll() {
        return orderFormDao.findAll();
    }

    @Override
    public OrderFormVO findByOrderFormId(String orderFormId) {
        return orderFormDao.findByOrderFormId(orderFormId);
    }

    @Override
    public List<OrderFormVO> findByCompanyId(int companyId) {
        return orderFormDao.findByCompanyId(companyId);
    }

    @Override
    public List<OrderFormVO> findByUserId(int userId) {
        return orderFormDao.findByUserId(userId);
    }

    @Override
    public int add(OrderForm orderForm) {
        return orderFormDao.add(orderForm);
    }

    @Override
    public int update(OrderFormVO orderForm) {
        return orderFormDao.update(orderForm);
    }

    @Override
    public int delete(int[] arrays) {
        return orderFormDao.delete(arrays);
    }
}
